package com.hbnu.reflect;

/**
 * @author kittychen
 * @since 2025-10-15 15:15
 */
public class Person {

    private String name;
    private int age;

    public double salary;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    private Person(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", salary=" + salary +
                '}';
    }

    public String method1() {
        return "public method1";
    }

    private void method2(String name) {
        System.out.println("private method2 " + name);
    }
}
